#include "wihu.h"


DECLSPEC_NORETURN void HijackSetup();

#ifdef HIJACKSETUP
#ifdef NOPOSTSETUP
/* HACK this! */
#ifdef DEBUG_SHOWEXITCODE
#define WihuPostSetup_ASMEntry ShowExitCodeAndExit

	const WCHAR message[]=L"The ExitCode of Windows Setup is 0x00000000";
DECLSPEC_NORETURN void __stdcall ShowExitCodeAndExit(int nExitCode){
	wsprintfW(L"%#010x", message+sizeof(message)-1-10, nExitCode);
	MessageBoxW(NULL, message, NULL, 0);
	ExitProcess(nExitCode);
}
#else
#define WihuPostSetup_ASMEntry dword ptr[ExitProcess]
#endif
#else
#define WihuPostSetup_ASMEntry WihuPostSetup
#endif
#endif